package com.github.easyms.common.vo;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 前端数据列表
 *
 * @author Leo.Liao
 * @date 2020-05-07 16:51:28
 */
@Data
@NoArgsConstructor
public class ResultPage<T> implements Serializable {

    private static final long serialVersionUID = -1791043199481512698L;
    private List<T> rows = new ArrayList();
    private Long total = 0L;
    private Long page = 1L;
    private List footer = new ArrayList();

    public ResultPage(List rows, Long total,Long page){
        this.rows.addAll(rows);
        this.total = total;
        this.page = page;
    }

    public ResultPage(List rows, Long total,Long page,List footer){
        this.rows.addAll(rows);
        this.total = total;
        this.page = page;
        this.footer.addAll(footer);
    }

}
